﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yunwei.Domain.Models.Mapping
{
    public class ShoppingCartMap : EntityTypeConfiguration<ShoppingCart>
    {
        public ShoppingCartMap()
        {
            this.HasKey(t => t.Id);
            this.Property(t => t.Food_Id).IsRequired();
            this.Property(t => t.User_Id).IsRequired();
            this.Property(t => t.Restaurant_Id).IsRequired();
            this.Property(t => t.Total).IsRequired();
            this.Property(t => t.Chef_Id).IsRequired();

            this.ToTable("ShoppingCart");
            this.Property(t => t.Food_Id).HasColumnName("Food_Id");
            this.Property(t => t.User_Id).HasColumnName("User_Id");
            this.Property(t => t.Restaurant_Id).HasColumnName("Restaurant_Id");
            this.Property(t => t.Total).HasColumnName("Total");
            this.Property(t => t.Chef_Id).HasColumnName("Chef_Id");
        }
    }
}
